chore(migration): Migrate code from googleapis/python-spanner into packages/google-cloud-spanner#16142
chore(migration): Migrate code from googleapis/python-spanner into packages/google-cloud-spanner#16142chalmerlowe wants to merge 1070 commits intomainfrom
Conversation
Co-authored-by: Astha Mohta <35952883+asthamohta@users.noreply.github.com>
* feat: Batch Write API implementation and samples * Update sample * review comments * return public class for mutation groups * Update google/cloud/spanner_v1/batch.py Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> * Update google/cloud/spanner_v1/batch.py Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> * review comments * remove doc * feat(spanner): nit sample data refactoring * review comments * fix test --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: Sri Harsha CH <sriharshach@google.com>
) * fix: Refactoring tests to use fixtures properly * Not using autouse fixtures for few tests where not needed * feat: Implementation for Begin and Rollback clientside statements * Incorporating comments * Formatting * Comments incorporated * Fixing tests * Small fix * Test fix as emulator was going OOM
…lates/python_library/.kokoro (#1043) Source-Link: googleapis/synthtool@9367caa Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2f155882785883336b4468d5218db737bb1d10c9cea7cb62219ad16fe248c03c Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* Implementation of client side statements that return * Small fix * Incorporated comments * Added tests for exception in commit and rollback * Fix in tests * Skipping few tests from running in emulator * Few fixes * Refactoring * Incorporated comments * Incorporating comments
* feat: Implementation for batch dml in dbapi * Few changes * Incorporated comments
…hecks (#1062) * chore: dummy commit * chore: edit yaml * chore: revert lint * chore: remove python versions * chore: reduce emulator version to 1.5.12 * chore: revert to latest
* test: unit test case fix * feat(spanner): lint --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: Sri Harsha CH <sriharshach@google.com>
* changes * changes * docs * docs * linting * feat(spanner): remove client side validations for directed read options * feat(spanner): update the auto_failover_disabled field * feat(spanner): update unit tests * feat(spanner): update test * feat(spanner): update documentation * feat(spanner): add system test to validate exception in case of RW transaction * feat(spanner): update unit test * feat(spanner): add dro for batchsnapshot and update system tests * feat(spanner): fix unit tests for batchsnapshot * feat(spanner): add unit tests for partition read and query * feat(spanner): lint fixes * feat(spanner): code refactor remove TransactionType * feat(spanner): comment refactor * feat(spanner): remove comments --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: Sri Harsha CH <sriharshach@google.com>
* feat: Implementation for partitioned query in dbapi * Comments incorporated and added more tests * Small fix * Test fix * Removing ClientSideStatementParamKey enum * Comments incorporated
…1071) * fix: Fix for flaky test_read_timestamp_client_side_autocommit test * Adding a row between 2 transactions so that read timestamp are different for the 2 transactions --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@fac8444 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…dding interceptors support for testing (#1056) * feat: Fixing and refactoring transaction retry logic in dbapi. Also adding interceptors support for testing * Comments incorporated and changes for also storing Cursor object with the statements details added for retry * Some refactoring of transaction_helper.py and maintaining state of rows update count for batch dml in cursor * Small fix * Maintaining a map from cursor to last statement added in transaction_helper.py * Rolling back the transaction when Aborted exception is thrown from interceptor * Small change * Disabling a test for emulator run * Reformatting
* feat(spanner): add proto and enum types PiperOrigin-RevId: 599046867 Source-Link: googleapis/googleapis@64a5bfe Source-Link: googleapis/googleapis-gen@6e96ab8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmU5NmFiOGJiMWVjNDUzNmM1YTBjNGQwOTVmNTNjZTA1NzhjYjhhNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add max_commit_delay API PiperOrigin-RevId: 599315735 Source-Link: googleapis/googleapis@465a103 Source-Link: googleapis/googleapis-gen@930e231 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwZTIzMThhY2JkMTBmYjU0ZDg2NjhkMmYyY2YxOWZlNDEzZDVhOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
* feat: Implementation of run partition query * Comments incorporated * Comments incorporated * Comments incorporated
* feat(spanner): add proto descriptors for proto and enum types in create/update/get database ddl requests PiperOrigin-RevId: 601013501 Source-Link: googleapis/googleapis@81b24a5 Source-Link: googleapis/googleapis-gen@46f0446 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZmMDQ0NjAzNzkwNmYwZDkwNTM2NTgzNWYwMmE2NTIyNDFmM2RlMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add FLOAT32 enum to TypeCode PiperOrigin-RevId: 601176446 Source-Link: googleapis/googleapis@584ecd4 Source-Link: googleapis/googleapis-gen@0bdb815 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGJkYjgxNTc3OWQwZmQ3ODI0YmFmZmYwYzkxMDQ2YTdkY2E1Y2Q1ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* fix: Few fixes in DBAPI * Small fix * Test fix
…nstance APIs. (#1065) * docs: samples and tests for auto-generated createDatabase and createInstance APIs. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix lint * incorporate suggestions * rename tests * fix lint * fix failures * chore(spanner): fix formatting * incorporate suggesitons --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Sri Harsha CH <sriharshach@google.com> Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
* proto generation * max commit delay * Fix some errors * Unit tests * regenerate proto changes * Fix unit tests * Finish test_transaction.py * Finish test_batch.py * Formatting * Cleanup * Fix merge conflict * Add optional=True * Remove optional=True, try calling HasField. * Update HasField to be called on the protobuf. * Update to timedelta.duration instead of an int. * Cleanup * Changes from Sri to pipe value to top-level funcitons and to add integration tests. Thanks Sri * Run nox -s blacken * feat(spanner): remove unused imports and add line * feat(spanner): add empty line in python docs * Update comment with valid values. * Update comment with valid values. * feat(spanner): fix lint * feat(spanner): rever nox file changes --------- Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Co-authored-by: Sri Harsha CH <sriharshach@google.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request completes a significant migration of the Google Cloud Spanner Python client library, moving all existing components into a new, consolidated package structure. This foundational change streamlines development, enhances maintainability, and introduces advanced tooling for asynchronous/synchronous code compatibility and comprehensive testing. The update also brings improved documentation and new examples for observability features like OpenTelemetry tracing. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
Closing in deference to #16156 |
OBE. Do not use.